package cate.game.db.mongo.kv;

import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.mongodb.repository.Query;

import java.util.List;

public interface KvDao extends MongoRepository<KvMongo,String> {

    @Query("{'_id': {$regex: /^?0/ }}")
    <T extends KvMongo> List<T> findByKeyPrefix(String keyPrefix, Class<T> eleClz);
}
